The Ultra Defragmenter contains few modules that are separated to five levels as shown on a picture below.
At the bottom level we have the kernel mode driver named ultradfg.sys. As described in this handbook this is the best solution for the disk defragmentation software. Driver gives us an interesting features and advantages over other defraggers.
The second level contains two different dynamically linked libraries.
ZenWINX is a common set of functions that most programs needs. Boot time defragger can't use win32 environment, it should use only ntdll.dll, but this library doesn't contain many important things like keyboard related procedures (gets, getch, kbhit), printf implementation and others. ZenWINX was created to resolve this problem. The full documentation for ZenWINX library is here.
On the other hand, the udefrag.dll library is just a thin level between the driver and user interfaces. It provides more simpler API than driver has. This module can import symbols from ntdll.dll (and other native dll's like zenwinx) only, because it is used by native (boot time) application.
Over the described modules are user interfaces located. They are well documented in this hanbook. I wrote them in pure C language because I would like to run UltraDefrag on old machines without any additional packages installed. Windows distribution doesn't contain any modern scripting languages packages (Python, Perl etc.), so C is better choice here.
As you can see, gui application uses some external software. The report converter produces html reports from a simple text file generated by driver. This converter is written in Lua, because this language has much better support for string manipulations than C or C++ have, and it's a very small package that can be included in UltraDefrag binaries without any problems.
Other programs that are used by gui are a text editor (that must have Unicode support) and a web browser. The first is needed to edit program's settings. It's better to use an external text editor than write a specialized one. Less code we have less bugs we have. Web browser is a good program to display file fragmentation reports.
The highest level of the Ultra Defragmenter I wrote in JavaScript language, because it is very simple, can be embedded in web pages and has good (though primitive enough) support for strings processing.
Of course, we have not discussed yet our installer and scheduler. NSIS gives us an ability to have both installer and portable package in the same file. This language is very powerful and we don't need to use something else at this moment.
Scheduler is an additional application that is much easier to use than built-in task scheduler interface. It requires .NET Framework installed because C# is a good choice to implement this component. Task scheduler API is too complicated to use them in C. Though, if you wish, rewrite the scheduler in C or maybe in Assembler.
I don't plan to write some additional interfaces, p.a. one with skins, another implemented in popular Python language and so on. But if you would like to have experiments in this area you are welcome!